<?php

namespace mpend\modules\activity\controllers;

use Yii;
use mpend\components\Controller;
use mpend\modules\activity\models\CareDashboardLogic;
use mpend\modules\activity\models\CareProductSearch;

/**
 * 精选频道
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class CareController extends Controller {

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            '*' => ['GET'],
        ];
    }

    /**
     * 精选活动
     * @inheritdoc
     */
    public function actionIndex() {
        $model = new CareDashboardLogic();
        return $model->toArray();
    }

    /**
     * 精选活动商品列表
     * @inheritdoc
     */
    public function actionList() {
        $model = new CareProductSearch();
        $model->activity_id = 1;
        $model->load(Yii::$app->request->getQueryParams(), '');
       

        return $model->search();
    }

}
